package cn.wolfcode.mapper;

import cn.wolfcode.Condition;
import cn.wolfcode.domain.OrderInfo;
import cn.wolfcode.domain.Product;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface ProductMapper {
    /**
     * 根据用户传入的id集合查询商品对象信息
     * @param ids
     * @return
     */
    List<Product> queryProductByIds(@Param("ids") List<Long> ids);

    int stockById(OrderInfo orderInfo);

    void addOrder(OrderInfo orderInfo);

    List<Product> findAll();

    List<OrderInfo> conditionFindByPage(Integer page, Integer pageSize,@Param(value ="condition") Condition condition);

    void updateOrder(OrderInfo orderInfo);

    void batchDeleteOrder(List<Long> ids);

    Product findById(Long id);
}
